In [1]:
%pylab inline
import rospy, tf
import vrep_common.srv
import geometry_msgs.msg, std_msgs.msg
import time
import matplotlib.pyplot as plt
import pylab
import numpy as np
In [4]:
getHandle = rospy.ServiceProxy('/vrep/simRosGetObjectHandle',
vrep_common.srv.simRosGetObjectHandle)
In [5]:
getHandle('Cuboid')
Out[5]:
In [7]:
getHandle('Revolute_joint')
Out[7]:
In [8]:
set_joint_position = rospy.ServiceProxy('/vrep/simRosSetJointTargetPosition',
vrep_common.srv.simRosSetJointTargetPosition)
In [16]:
set_joint_position(27, 0)
Out[16]:
In [35]:
set_joint_position(27, 0)
Out[35]:
In [22]:
import IPython.html.widgets as ipywidgets
In [20]:
def setpoint(x):
set_joint_position(27, x)
In [34]:
ipywidgets.interact(setpoint, x=ipywidgets.FloatSliderWidget())